message = Map();
response = getUrl("http://api.pearson.com/v2/dictionaries/laad3/entries?apikey=*INSERT_API_KEY*&headword=" + arguments.get(0).toLowerCase());
if(arguments.length() == 0)
{
	message.put("text","Please enter a word to find the meaning");
}
else if(response.get("results").length() != 0)
{
	results = response.get("results");
	loop = 0;
	count = -1;
	flag = 0;
	for each  temp in results
	{
		if(results.get(loop).get("headword") == arguments.get(0).toLowerCase() && flag == 0)
		{
			count = loop;
			flag = 1;
		}
		loop = loop + 1;
	}
	if(count != -1)
	{
		orginalText = response.get("results").get(count).get("senses").get(0).get("definition");
		definition = orginalText.subString(0,1);
		definition = definition.toUpperCase();
		definition = definition + orginalText.subString(1,orginalText.length());
		result = "Definition of *" + arguments.get(0) + "* : " + definition;
		example = response.get("results").get(count).get("senses").get(0);
		info response;
		if(example.size() == 2)
		{
			if(response.get("results").get(count).get("senses").get(0).get("examples").isNull() == false)
			{
				result = result + ". Example: " + response.get("results").get(count).get("senses").get(0).get("examples").get(0).get("text");
			}
		}
	}
	else
	{
		result = "Unable to find meaning for the word you have entered.";
	}
	message.put("text",result);
}
else
{
	message.put("text","Unable to find meaning for the word. Please check the spelling");
}
return message;